package com.kye.express.business.found.tab;

public enum FoundTabType {

    WELFARE(0, "福利"),
    NEWS(1, "新闻"),
    VIDEO(2, "视频");

    FoundTabType(int position, String desc) {
        this.position = position;
        this.desc = desc;
    }

    private int position;
    private String desc;

    public int getPosition() {
        return position;
    }

    public void setPosition(int position) {
        this.position = position;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static FoundTabType toType(int position) {
        switch (position) {
            case 0:
                return WELFARE;
            case 1:
                return NEWS;
            case 2:
                return VIDEO;
            default:
                throw new IllegalArgumentException("position error");
        }
    }
}
